<?php

namespace app\common\middleware;

use app\common\event\SystemConfig;
use app\event\ucenter\User as UserEvent;
use app\model\ucenter\User as UserModel;
use app\event\ucenter\IpPool as IpPoolEvent;
use think\exception\HttpResponseException;
use think\facade\Config;
use think\facade\Cookie;
use think\facade\Env;
use think\facade\Event;
use think\facade\Lang;
use think\facade\Log;
use think\facade\Request;
use think\facade\View;
use think\Response;
use think\response\Redirect;

class AppInit
{
    public function handle($request, \Closure $next)
    {
//        Log::write('测试日志信息，这是警告级别，并且实时写入');
//        Log::info('[test1] ' .  time_format('','Y-m-d H:i:s.u'));
//        Log::record('----------------------------------------------------------------------');
        // 加载配置
        SystemConfig::parse();
//        Log::info('[test2] ' .  time_format('','Y-m-d H:i:s.u'));
        return $next($request);
    }

}